package com.eduction.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eduction.modules.system.dao.CourseRecordMapRepository;
import com.eduction.modules.system.entity.CourseRecordMap;
import com.eduction.service.CourseRecordMapService;

@Service
public class CourseRecordMapServiceImpl implements CourseRecordMapService {

	@Autowired
	private CourseRecordMapRepository courseRecordMapRepository;
	@Override
	public void saveCourseRecordMap(CourseRecordMap c) {
		this.courseRecordMapRepository.saveCourseRecordMap(c);
	}

	@Override
	public void updateCourseRecordMapState(String sign,String schoolId,String expertId) throws SQLException {
		this.courseRecordMapRepository.updateCourseRecordMapState(sign,schoolId,expertId);
	}

	@Override
	public List<CourseRecordMap> queryMapsByExpert(String expertId,String identity) throws SQLException {
		// TODO Auto-generated method stub
		return this.courseRecordMapRepository.queryMapsByExpert(expertId,identity);
	}
	@Override
	public CourseRecordMap queryCourseRecordById(String sign, String schoolId, String expertId) throws SQLException {
		return this.courseRecordMapRepository.queryCourseRecordById(sign,schoolId,expertId);
	}

	@Override
	public CourseRecordMap findByPid(String pid){
		return this.courseRecordMapRepository.findByPid(pid);
	}

	@Override
	public void deleteByPid(String pid){
		this.courseRecordMapRepository.deleteByPid(pid);
	}
	@Override
	public List<CourseRecordMap> queryMapsBySchoolId(String schoolId)  throws SQLException {
		return this.courseRecordMapRepository.queryMapsBySchoolId(schoolId);
	}



}
